package com.soryin.service.impl;

import java.io.Serializable;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.transaction.annotation.Transactional;

import com.soryin.dao.UserDao;
import com.soryin.entity.User;
import com.soryin.service.UserService;

/**
 * 用户 Service 方法实现
 * @author Hello_海生
 * @date 2014年3月21日
 */
@Transactional
public class UserServiceImpl implements UserService{
	
	@Resource
	private UserDao userDao;
	

	@Override
	public Serializable save(User u) {
		// TODO Auto-generated method stub
		return userDao.save(u);
	}

	@Override
	public void delete() {
		// TODO Auto-generated method stub
		
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<User> finAll() {
		// TODO Auto-generated method stub
		return (List<User>) userDao.findAll();
	}

	@Override
	public User findById(Serializable id) {
		// TODO Auto-generated method stub
		return userDao.findById(id);
	}

}
